﻿
using System.ComponentModel;

namespace Marmat.Forms
{

    /// <summary>
    /// 表示包含事件数据的类的基类，并提供用于不包含事件数据的事件的值。
    /// </summary>
    public class ChangingEventArgs : CancelEventArgs
    {
        public ChangingEventArgs(object oldValue, object newValue)
        {
            this.OldValue = oldValue;
            this.NewValue = newValue;
        }

        public ChangingEventArgs(object oldValue, object newValue, bool cancel)
        {
            this.OldValue = oldValue;
            this.NewValue = newValue;
            this.Cancel = cancel;
        }

        public object OldValue { get; private set; }
        public object NewValue { get; set; }
    }
}